package com.yuju.account.enums;

public enum AccountReportReturnCodeEnum {
	ACCOUNTREPORT_QUERY_SUCCESS("yuju-accountReport-1001", "订单账务报表信息查找成功"),
	ACCOUNTREPORT_QUERY_FAILURE("yuju-accountReport-1002", "订单账务报表信息查找失败"),
	ACCOUNTREPORT_GUEST_SUCCESS("yuju-accountReport-1004", "宾客余额报表信息查找成功"),
	ACCOUNTREPORT_GUEST_FAILURE("yuju-accountReport-1005", "宾客余额报表信息查找失败"),
	ACCOUNTREPORT_SUM_SUCCESS("yuju-accountReport-1006", "宾客余额报表总计信息查找成功"),
	ACCOUNTREPORT_SUM_FAILURE("yuju-accountReport-1007", "宾客余额报表总计信息查找失败"),
	ACCOUNTREPORT_NOTHING("yuju-accountReport-1003", "无数据");
	
	private String code;
	private String desc;
	
	AccountReportReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (AccountReturnCodeEnum enume : AccountReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
